package com.zone.vehicle.superApps.db;

import com.zone.vehicle.superApps.db.entity.App;
import com.zone.vehicle.superApps.db.gen.AppDao;

/**
 * @Author: pkqlqx
 * @CreateDate: 2021/12/7 16:58
 * @Description: 初始化、存放及获取DaoUtils
 */
public class DaoUtilsStore {
    private volatile static DaoUtilsStore instance = new DaoUtilsStore();
    private com.zone.vehicle.superApps.db.AppDaoUtils<App> appDaoUtils;

    public static DaoUtilsStore getInstance() {
        return instance;
    }

    private DaoUtilsStore() {
        com.zone.vehicle.superApps.db.DaoManager mManager = com.zone.vehicle.superApps.db.DaoManager.getInstance();
        AppDao appDao = mManager.getDaoSession().getAppDao();
        appDaoUtils = new com.zone.vehicle.superApps.db.AppDaoUtils<>(App.class, appDao);
    }

    public com.zone.vehicle.superApps.db.AppDaoUtils<App> getAppDaoUtils() {
        return appDaoUtils;
    }

}